const STATUS = {
    0: '未付款',
    1: '已支付',
    2: '已关闭',
    3: '申请退款中',
    4: '已退款'
}

export const IS_TAKE = {
    1: '已下单',
    2: '待接单',
    3: '已接单',
    4: '已收件',
    6:'已取衣',
    8:'开始清洗',
    10:'已包装',
    12:'已出厂',
    14:'送衣中',
    16:'已送达',
    18:'可取衣',
    20:'订单完成',
}

const SERVE_IS_TAKE = {
    1: '已下单',
    2: '待接单',
    3: '已接单',
    4: '准备服务',
    5: '服务中',
    6: '服务完成',
    7: '完成订单'
}

const GOODS_IS_TAKE = {
    1: '已下单',
    2: '待接单',
    3: '已接单',
    5: '已发货',
    7: '确认收货'
}

const KINDS_STATUS = {
    0: '否',
    1: '是'
}

const COLORS_MAP = {
    0: 'red',
    1: 'blue'
}

export const EXPRESS_STATUS = {
    0: '待下单',
    1: '已下单',
	2: '订单取消'
}

export default {
    filters: {
        // eslint-disable-next-line camelcase
        statusFilter ({ is_take, status }) {
            if (status === 1) {
                return IS_TAKE[is_take]
            }
            return STATUS[status]
        },
         // eslint-disable-next-line camelcase
        serveStatusFilter ({ is_take, status }) {
            if (status === 1) {
                return SERVE_IS_TAKE[is_take]
            }
            return STATUS[status]
        },
         // eslint-disable-next-line camelcase
        goodsStatusFilter ({ is_take, status }) {
            if (status === 1) {
                return GOODS_IS_TAKE[is_take]
            }
            return STATUS[status]
        },
        monadCodeFilter (monadCode, splitCode) {
            return monadCode + splitCode
        },
        kindsStatusFilter (status) {
            return KINDS_STATUS[status]
        }
      },
    methods: {
        orderStatus (status) {
            const STATUS = {
                    0: 'processing',
                    1: 'success',
                    2: 'error',
                    3: 'warning',
                    4: 'error'
                }
            return STATUS[status]
        },
        kindsStatusDisplay (status) {
            return COLORS_MAP[status]
        }
    }
}
